The wizard reads the final output file of Oligopoly, finding them in the current folder and producing a list from which to choose.

It is based on quickviz. there is also a tutorial.

The tutorial (or a part of it) also works directly in Binder.

quickviz uses seaborn on pandas.

Below we have the possible graphical production from two of the databases.


In [ ]:
import numpy as np
import pandas as pd
    
from quickviz import visualize as v # use v(df)

import warnings as wn

#precision in tables
pd.set_option('precision',2)
#rows in tables
pd.set_option('display.max_rows', 1000)

wn.filterwarnings(action="ignore")

In [ ]:
# to chose a csv file in the current folder
import os
filesHere=os.listdir("./")
selected=[]
for i in range(len(filesHere)):
    if filesHere[i].find('_ts.csv')>0: selected.append(filesHere[i])
selected.sort()
for i in range(len(selected)):
    print (i, selected[i])

In [ ]:
num=int(input("Choose a file via its number (>=0;<="+str(len(selected)-1)+" "))

try:
    modPars_df = pd.read_csv(selected[num][:17]+'_modPars.csv')
    modPars_df.index += 1 
except BaseException:
    modPars_df = pd.DataFrame([["no changes in parameters"]],columns=["  "])
    modPars_df.index += 1

firms=False
    
try:
    firms_df = pd.read_csv(selected[num][:17]+'_firms.csv')
    modPars_df.index += 1 
    firms=True
except BaseException:
    pass


par_df = pd.read_csv(selected[num][:17]+'_par.csv')
par_df.index += 1 

ts_df = pd.read_csv(selected[num])
#set index to start from 1, data are collected at the end of each period
ts_df.index += 1 

str_df = pd.read_csv(selected[num][:17]+'_str.csv')
#leave index to start from 0, data are collected at the beginning of each period

In [ ]:
# parameters (not interesting in a graphic way due to non numerical contents)
#v(par_df)

In [ ]:
# structure
v(str_df)

In [ ]:
# time series
v(ts_df)

In [ ]:
#v(firms_df)
#not existing for old runs and not interesting